<?php
/**
 * Created by PhpStorm.
 * User: Edward
 * Date: 2019/5/31
 * Time: 14:52
 */

namespace app\admin\model;


class ChinaArea  extends Base {
    /**
     * 根据城市id查询地区
     * @param $id
     * @return array|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public static function area($id){
        return self::field('id,name,city_id')
            ->where(['status'=>0,'city_id'=>$id])->select();
    }
}